export type TeamUserType = {
  id: string;
  name: string;
  room: string | null;
};

export type CurrenUserType = { id?: string; name: string; room: string };

export type InitialStateType = {
  wsStatus: boolean;
  myname: null | string;
  id: null | string;
};

export type PlayerType = TeamUserType & { count: number };

export type UserType = {
  id?: null | string;
  name?: string;
  score?: number;
  hasAnswer?: boolean;
};

export type QuestionType = {
  id: number;
  question: string;
  rightAnswer: number;
  themeId: number;
};

export type AnswerType = {
  id: number;
  answer: string;
  questionId: number | null;
};

export type GameType = {
  status: 'unknown' | 'waiting' | 'start';
  roomName: string | null;
  creator: UserType;
  players: UserType[];
  questions: QuestionType[];
  currentQuestionId: number;
  themeId: number | null;
  currentAnswers: AnswerType[];
};
